{% extends 'admin/admin_mould.html' %}

{% block title %}
  registered-list
{% endblock %}

{% block body %}
  <style>
    .form-box {
      margin: 10px 20px 10px 20px;
      text-align: center;
    }

    .input-mag {
      margin: 0 5px 0 5px;
    }
  </style>

  <div class="container">
    <!-- start header -->
    <div class="page-header">
      <h3>域名抢注列表
        <small>正在抢注的域名清单</small>
      </h3>
    </div>
    <!-- end header -->
    <div class="modify-box">
      <div class="form-box">
        <form class="form-inline" action="/admin/addBase" method="POST">
          <div class="form-group input-mag">
            <input type="text" class="form-control" id="addDoaminName" name="addDoaminName" placeholder="抢注的域名">
          </div>
          <div class="form-group input-mag">
            <input type="text" class="form-control" id="addBaseTotle" name="addBaseTotle" placeholder="骗人的总(BASE)人数">
          </div>
          <div class="form-group input-mag">
            <input type="text" class="form-control" id="addBasePrice" name="addBasePrice" placeholder="骗人的最高(BASE)价">
          </div>
          <input type="submit" id="AddBase" class="btn btn-primary input-mag" value="添加抢注域名">
        </form>
      </div>
      <hr/>
      <div>
        <table class="table table-striped text-center">
          <thead>
          <tr style="font-size: 16px;">
            <td>域名</td>
            <td>当前抢注人数</td>
            <td>当前抢注最高价</td>
          </tr>
          </thead>
          <tbody>
          {% for key,value in info_list.items %}
            <tr>
              <td><a href="/admin/registered-info?id={{ value.domain_id }}">{{ key }}</a></td>
              <td>{{ value.totle }}</td>
              <td>{{ value.max_price }}</td>
            </tr>
          {% endfor %}
          </tbody>
        </table>
      </div>
    </div>
  </div>
  <script src="/static/js/jquery.min.js"></script>
  <script>
    function checkNumber(theObj) {
            var reg = /^[0-9]+.?[0-9]*$/;
            if (reg.test(theObj)) {
                return true;
            };
            return false;
        };
  </script>
{% endblock %}